package com.example.tree.service.impl;

import com.example.tree.bean.Menu;
import com.example.tree.bean.MenuTree;
import com.example.tree.mapper.MenuMapper;
import com.example.tree.service.MenuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ZhengDing
 * @since 2022-02-21 19:49:45
 */
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements MenuService {
    
    @Override
    public List<MenuTree> getTreeByPid(Integer pid) {
        return this.baseMapper.getTreeByPid(pid);
    }
    
    @Override
    public List<MenuTree> getRootTree() {
        return this.baseMapper.getRootTree();
    }
    
    @Override
    public List<MenuTree> getMainTree() {
        return this.baseMapper.getMainTree();
    }
}
